# 7个数字 [1 15 35 55 65 85 99] 找出2个数相加等于100，有几组。

# nums = [1, 15, 35, 55, 65, 85, 77, 99]
# nums.sort()  # 排序数组
# left, right = 0, len(nums) - 1
# result = []
# count = 0
# while left < right:
#     current_sum = nums[left] + nums[right]
#     if current_sum == 100:
#         result.append((nums[left], nums[right]))
#         left += 1
#         right -= 1
#         count += 1
#
#
#     elif current_sum < 100:
#         left += 1
#     else:
#         right -= 1
#
# print(f"共有 {count} 组")

nums = [1, 15, 35, 55, 65, 85, 99]
seen = set()
pairs = []
count = 0

for num in nums:
    target = 100 - num
    if target in nums:
        count += 1
print(int(count / 2))


from rest_framework.serializers import HyperlinkedModelSerializer
